package com.ruoyi.backend.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Field {

    public interface Upload {
    }

    public interface Update {
    }

    @NotNull(groups = {Field.Update.class}, message = "外业调查ID不能为空")
    Integer investigateId;

    @NotNull(groups = {Field.Upload.class}, message = "矿山ID不能为空")
    String mineId;

    @NotNull(groups = {Field.Upload.class}, message = "外业调查类型不能为空")
    String investigateType;

    @NotNull(groups = {Field.Upload.class}, message = "外业调查名称不能为空")
    String investigateName;

    @NotNull(groups = {Field.Upload.class}, message = "外业调查自动命名不能为空")
    String investigateAutomatic;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(groups = {Field.Upload.class}, message = "外业调查时间不能为空")
    LocalDate investigateTime;

    @NotNull(groups = {Field.Upload.class}, message = "外业调查单位不能为空")
    String investigateUnit;

    @NotNull(groups = {Field.Upload.class}, message = "epsg编码不能为空")
    Integer epsgCode;
}
